<script setup type="module">
    import {ref, defineEmits, toRef} from 'vue'
    
    const emits = defineEmits(['message'])
    
    let msgArr = ['学员管理', '图书管理', '请假管理', '考试管理', '讲师管理']

    function fun(item) {
        console.log('点击')
        // toRef(item)
        emits('message', item)
    }

</script>

<template>
    <div>
        <ul>
            <li v-for="(item, index) in msgArr" :key="index" v-text="item" @click="fun(item)"></li>
        </ul>
        
    </div>
</template>

<style scoped>

</style>